/*
 * @Author: 米亚流年 miyaliunian@gmail.com
 * @Date: 2024-02-20 14:13:59
 * @LastEditors: 米亚流年 miyaliunian@gmail.com
 * @LastEditTime: 2024-03-26 15:41:26
 * @FilePath: /Component-Gallery/docs/demo/routes/routes.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import apiRoutes from "./apiRoute";

const routes = [
  {
    name: "home",
    path: "/",
    component: async () => await import("../pages/index.vue"),
  },
  {
    name: "introduction",
    path: "/introduction",
    component: async () => await import("../layout/IntroduceLayout.vue"),
    redirect: "/introduction/summary",
    children: [
      {
        path: "summary",
        component: () => import("../vueDocs/introduce.vue_doc.md"),
      },
      {
        path: "theme",
        component: () => import("../vueDocs/customize_theme.vue_doc.md"),
      },
      {
        path: "remote",
        component: () => import("../vueDocs/remote.vue_doc.md"),
      },
      {
        path: "comp-docs",
        component: () => import("../vueDocs/comp-docs.vue_doc.md"),
      },
      {
        path: "customize_comp",
        component: () => import("../vueDocs/customize_comp.vue_doc.md"),
      },
      {
        path: "auto-rem",
        component: () => import("../vueDocs/auto-rem.vue_doc.md"),
      },
      {
        path: "map-manual",
        component: () => import("../vueDocs/map-manual.vue_doc.md"),
      },
    ],
  },
  {
    name: "components",
    path: "/components",
    component: async () => await import("../layout/BasicLayout.vue"),
    redirect: "/components/common-comp-fire-warning",
    // children: apiRoutes,
  },
  {
    name: "not-found",
    path: "/:pathMatch(.*)*",
    redirect: {
      name: "home",
      params: {
        lang: navigator.language,
        theme: "os-theme",
      },
    },
  },
];

export default routes;
